package Homework;

import java.util.Scanner;

/**
 * @program: Java_Study
 * @author: Xiaofan
 * @createTime: 2021-07-06 20:04
 * @description: Functions of this class is 判断闰年数
 **/
public class C1 {
    public static void main(String args[]){
        Scanner scanner=new Scanner(System.in);
        while (scanner.hasNext()){
            int n=scanner.nextInt();
            while (n-->0){
                int year=scanner.nextInt();
                if (judge(year)) {
                    System.out.println("YES");
                } else {
                    System.out.println("NO");
                }
            }
        }
    }
    private static boolean judge(int year){
        return ((year%400==0)||(year%100!=0&&year%4==0))?true:false;
    }
}